home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / gdb-4.5 / sun4.md / gdb / core.man < prev    next >
Encoding:
Text File  |  1992-06-24  |  4.2 KB  |  131 lines

  1. CORE(5)                   FILE FORMATS                    CORE(5)
  2.  
  3.  
  4.  
  5. NAME
  6.      core - format of memory image file
  7.  
  8. SYNOPSIS
  9.      #include <sys/core.h>
  10.  
  11. DESCRIPTION
  12.      The operating system writes out a memory  image  of  a  ter-
  13.      minated  process  when  any  of  various  errors occur.  See
  14.      sigvec(2) for the list  of  reasons;  the  most  common  are
  15.      memory  violations,  illegal  instructions,  bus errors, and
  16.      user-generated quit signals.  The  memory  image  is  called
  17.      core and is written in the process's working directory (pro-
  18.      vided it can be; normal access controls apply).  Set-user-ID
  19.      and  set-group-ID  programs  do  not produce core files when
  20.      they terminate as this would cause a security loophole.
  21.  
  22.      The maximum size of a core file is limited by setrlimit (see
  23.      getrlimit(2)).   Files  which would be larger than the limit
  24.      are not created.
  25.  
  26.      The core file consists of a core structure,  as  defined  in
  27.      the  <sys/core.h>  file, followed by the data pages and then
  28.      the stack pages of the process image.   The  core  structure
  29.      includes  the  program's header, the size of the text, data,
  30.      and stack segments, the name of the program and  the  number
  31.      of  the  signal  that terminated the process.  The program's
  32.      header is described by the exec  structure  defined  in  the
  33.      <sys/exec.h> file, except on Sun386i systems.
  34.  
  35.           struct core {
  36.                     int  c_magic;  /* Corefile magic number */
  37.                     int  c_len;    /* Sizeof (struct core) */
  38.                     struct         regs c_regs;/* General purpose registers */
  39.                     struct         exec c_aouthdr;/* A.out header */
  40.                     int  c_signo;  /* Killing signal, if any */
  41.                     int  c_tsize;  /* Text size (bytes) */
  42.                     int  c_dsize;  /* Data size (bytes) */
  43.                     int  c_ssize;  /* Stack size (bytes) */
  44.                     char c_cmdname[CORE_NAMELEN + 1]; /* Command name */
  45.                     struct         fpu c_fpu;/* external FPU state */
  46.                     int  c_ucode;  /* Exception no. from u_code */
  47.           };
  48.  
  49.      The members of the structure are:
  50.  
  51.      c_magic        The magic number CORE_MAGIC , as  defined  in
  52.                     <sys/core.h>.
  53.  
  54.      c_len          The length of the core structure in the  core
  55.                     file.   This need not be equal to the current
  56.                     size  of  a  core  structure  as  defined  in
  57.  
  58.  
  59.  
  60. Sun Release 4.1   Last change: 18 February 1988                 1
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67. CORE(5)                   FILE FORMATS                    CORE(5)
  68.  
  69.  
  70.  
  71.                     <sys/core.h>,  as the core file may have been
  72.                     produced on a different release of the  SunOS
  73.                     operating system.
  74.  
  75.      c_regs         The general purpose registers at the time the
  76.                     core  file  was  produced.  This structure is
  77.                     machine-dependent.
  78.  
  79.      c_aouthdr      The executable image header of the program.
  80.  
  81.      c_signo        The number of the signal that terminated  the
  82.                     process; see sigvec(2).
  83.  
  84.      c_tsize        The size of the text segment of  the  process
  85.                     at the time the core file was produced.
  86.  
  87.      c_dsize        The size of the data segment of  the  process
  88.                     at the time the core file was produced.  This
  89.                     gives the amount of data space image  in  the
  90.                     core file.
  91.  
  92.      c_ssize        The size of the stack segment of the  process
  93.                     at the time the core file was produced.  This
  94.                     gives the amount of stack space image in  the
  95.                     core file.
  96.  
  97.      c_cmdname      The first CORE_NAMELEN characters of the last
  98.                     component of the path name of the program.
  99.  
  100.      c_fpu          The status of the floating point hardware  at
  101.                     the time the core file was produced.
  102.  
  103.      c_ucode        The signal code of the signal that terminated
  104.                     the process, if any.  See sigvec(2).
  105.  
  106. SEE ALSO
  107.      adb(1), dbx(1), getrlimit(2), sigvec(2)
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126. Sun Release 4.1   Last change: 18 February 1988                 2
  127.  
  128.  
  129.  
  130.  
  131.